Optimal. Leaf size=216 \[ \frac {i b^2}{2 c^2 d^2 (i-c x)}-\frac {i b^2 \text {ArcTan}(c x)}{2 c^2 d^2}-\frac {b (a+b \text {ArcTan}(c x))}{c^2 d^2 (i-c x)}+\frac {(a+b \text {ArcTan}(c x))^2}{2 c^2 d^2}-\frac {i (a+b \text {ArcTan}(c x))^2}{c^2 d^2 (i-c x)}+\frac {(a+b \text {ArcTan}(c x))^2 \log \left (\frac {2}{1+i c x}\right )}{c^2 d^2}+\frac {i b (a+b \text {ArcTan}(c x)) \text {PolyLog}\left (2,1-\frac {2}{1+i c x}\right )}{c^2 d^2}+\frac {b^2 \text {PolyLog}\left (3,1-\frac {2}{1+i c x}\right )}{2 c^2 d^2} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.26, antiderivative size = 216, normalized size of antiderivative = 1.00, number of steps
used = 13, number of rules used = 10, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.435, Rules used = {4996, 4974,
4972, 641, 46, 209, 5004, 4964, 5114, 6745} \begin {gather*} \frac {i b \text {Li}_2\left (1-\frac {2}{i c x+1}\right ) (a+b \text {ArcTan}(c x))}{c^2 d^2}-\frac {b (a+b \text {ArcTan}(c x))}{c^2 d^2 (-c x+i)}-\frac {i (a+b \text {ArcTan}(c x))^2}{c^2 d^2 (-c x+i)}+\frac {(a+b \text {ArcTan}(c x))^2}{2 c^2 d^2}+\frac {\log \left (\frac {2}{1+i c x}\right ) (a+b \text {ArcTan}(c x))^2}{c^2 d^2}-\frac {i b^2 \text {ArcTan}(c x)}{2 c^2 d^2}+\frac {b^2 \text {Li}_3\left (1-\frac {2}{i c x+1}\right )}{2 c^2 d^2}+\frac {i b^2}{2 c^2 d^2 (-c x+i)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 46
Rule 209
Rule 641
Rule 4964
Rule 4972
Rule 4974
Rule 4996
Rule 5004
Rule 5114
Rule 6745
Rubi steps
\begin {align*} \int \frac {x \left (a+b \tan ^{-1}(c x)\right )^2}{(d+i c d x)^2} \, dx &=\int \left (-\frac {i \left (a+b \tan ^{-1}(c x)\right )^2}{c d^2 (-i+c x)^2}-\frac {\left (a+b \tan ^{-1}(c x)\right )^2}{c d^2 (-i+c x)}\right ) \, dx\\ &=-\frac {i \int \frac {\left (a+b \tan ^{-1}(c x)\right )^2}{(-i+c x)^2} \, dx}{c d^2}-\frac {\int \frac {\left (a+b \tan ^{-1}(c x)\right )^2}{-i+c x} \, dx}{c d^2}\\ &=-\frac {i \left (a+b \tan ^{-1}(c x)\right )^2}{c^2 d^2 (i-c x)}+\frac {\left (a+b \tan ^{-1}(c x)\right )^2 \log \left (\frac {2}{1+i c x}\right )}{c^2 d^2}-\frac {(2 i b) \int \left (-\frac {i \left (a+b \tan ^{-1}(c x)\right )}{2 (-i+c x)^2}+\frac {i \left (a+b \tan ^{-1}(c x)\right )}{2 \left (1+c^2 x^2\right )}\right ) \, dx}{c d^2}-\frac {(2 b) \int \frac {\left (a+b \tan ^{-1}(c x)\right ) \log \left (\frac {2}{1+i c x}\right )}{1+c^2 x^2} \, dx}{c d^2}\\ &=-\frac {i \left (a+b \tan ^{-1}(c x)\right )^2}{c^2 d^2 (i-c x)}+\frac {\left (a+b \tan ^{-1}(c x)\right )^2 \log \left (\frac {2}{1+i c x}\right )}{c^2 d^2}+\frac {i b \left (a+b \tan ^{-1}(c x)\right ) \text {Li}_2\left (1-\frac {2}{1+i c x}\right )}{c^2 d^2}-\frac {b \int \frac {a+b \tan ^{-1}(c x)}{(-i+c x)^2} \, dx}{c d^2}+\frac {b \int \frac {a+b \tan ^{-1}(c x)}{1+c^2 x^2} \, dx}{c d^2}-\frac {\left (i b^2\right ) \int \frac {\text {Li}_2\left (1-\frac {2}{1+i c x}\right )}{1+c^2 x^2} \, dx}{c d^2}\\ &=-\frac {b \left (a+b \tan ^{-1}(c x)\right )}{c^2 d^2 (i-c x)}+\frac {\left (a+b \tan ^{-1}(c x)\right )^2}{2 c^2 d^2}-\frac {i \left (a+b \tan ^{-1}(c x)\right )^2}{c^2 d^2 (i-c x)}+\frac {\left (a+b \tan ^{-1}(c x)\right )^2 \log \left (\frac {2}{1+i c x}\right )}{c^2 d^2}+\frac {i b \left (a+b \tan ^{-1}(c x)\right ) \text {Li}_2\left (1-\frac {2}{1+i c x}\right )}{c^2 d^2}+\frac {b^2 \text {Li}_3\left (1-\frac {2}{1+i c x}\right )}{2 c^2 d^2}-\frac {b^2 \int \frac {1}{(-i+c x) \left (1+c^2 x^2\right )} \, dx}{c d^2}\\ &=-\frac {b \left (a+b \tan ^{-1}(c x)\right )}{c^2 d^2 (i-c x)}+\frac {\left (a+b \tan ^{-1}(c x)\right )^2}{2 c^2 d^2}-\frac {i \left (a+b \tan ^{-1}(c x)\right )^2}{c^2 d^2 (i-c x)}+\frac {\left (a+b \tan ^{-1}(c x)\right )^2 \log \left (\frac {2}{1+i c x}\right )}{c^2 d^2}+\frac {i b \left (a+b \tan ^{-1}(c x)\right ) \text {Li}_2\left (1-\frac {2}{1+i c x}\right )}{c^2 d^2}+\frac {b^2 \text {Li}_3\left (1-\frac {2}{1+i c x}\right )}{2 c^2 d^2}-\frac {b^2 \int \frac {1}{(-i+c x)^2 (i+c x)} \, dx}{c d^2}\\ &=-\frac {b \left (a+b \tan ^{-1}(c x)\right )}{c^2 d^2 (i-c x)}+\frac {\left (a+b \tan ^{-1}(c x)\right )^2}{2 c^2 d^2}-\frac {i \left (a+b \tan ^{-1}(c x)\right )^2}{c^2 d^2 (i-c x)}+\frac {\left (a+b \tan ^{-1}(c x)\right )^2 \log \left (\frac {2}{1+i c x}\right )}{c^2 d^2}+\frac {i b \left (a+b \tan ^{-1}(c x)\right ) \text {Li}_2\left (1-\frac {2}{1+i c x}\right )}{c^2 d^2}+\frac {b^2 \text {Li}_3\left (1-\frac {2}{1+i c x}\right )}{2 c^2 d^2}-\frac {b^2 \int \left (-\frac {i}{2 (-i+c x)^2}+\frac {i}{2 \left (1+c^2 x^2\right )}\right ) \, dx}{c d^2}\\ &=\frac {i b^2}{2 c^2 d^2 (i-c x)}-\frac {b \left (a+b \tan ^{-1}(c x)\right )}{c^2 d^2 (i-c x)}+\frac {\left (a+b \tan ^{-1}(c x)\right )^2}{2 c^2 d^2}-\frac {i \left (a+b \tan ^{-1}(c x)\right )^2}{c^2 d^2 (i-c x)}+\frac {\left (a+b \tan ^{-1}(c x)\right )^2 \log \left (\frac {2}{1+i c x}\right )}{c^2 d^2}+\frac {i b \left (a+b \tan ^{-1}(c x)\right ) \text {Li}_2\left (1-\frac {2}{1+i c x}\right )}{c^2 d^2}+\frac {b^2 \text {Li}_3\left (1-\frac {2}{1+i c x}\right )}{2 c^2 d^2}-\frac {\left (i b^2\right ) \int \frac {1}{1+c^2 x^2} \, dx}{2 c d^2}\\ &=\frac {i b^2}{2 c^2 d^2 (i-c x)}-\frac {i b^2 \tan ^{-1}(c x)}{2 c^2 d^2}-\frac {b \left (a+b \tan ^{-1}(c x)\right )}{c^2 d^2 (i-c x)}+\frac {\left (a+b \tan ^{-1}(c x)\right )^2}{2 c^2 d^2}-\frac {i \left (a+b \tan ^{-1}(c x)\right )^2}{c^2 d^2 (i-c x)}+\frac {\left (a+b \tan ^{-1}(c x)\right )^2 \log \left (\frac {2}{1+i c x}\right )}{c^2 d^2}+\frac {i b \left (a+b \tan ^{-1}(c x)\right ) \text {Li}_2\left (1-\frac {2}{1+i c x}\right )}{c^2 d^2}+\frac {b^2 \text {Li}_3\left (1-\frac {2}{1+i c x}\right )}{2 c^2 d^2}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.48, size = 300, normalized size = 1.39 \begin {gather*} \frac {\frac {12 i a^2}{-i+c x}-12 i a^2 \text {ArcTan}(c x)-6 a^2 \log \left (1+c^2 x^2\right )-6 i a b \left (4 \text {ArcTan}(c x)^2-\cos (2 \text {ArcTan}(c x))+2 \text {PolyLog}\left (2,-e^{2 i \text {ArcTan}(c x)}\right )-2 i \text {ArcTan}(c x) \left (\cos (2 \text {ArcTan}(c x))-2 \log \left (1+e^{2 i \text {ArcTan}(c x)}\right )-i \sin (2 \text {ArcTan}(c x))\right )+i \sin (2 \text {ArcTan}(c x))\right )+b^2 \left (-8 i \text {ArcTan}(c x)^3+3 \cos (2 \text {ArcTan}(c x))+6 i \text {ArcTan}(c x) \cos (2 \text {ArcTan}(c x))-6 \text {ArcTan}(c x)^2 \cos (2 \text {ArcTan}(c x))+12 \text {ArcTan}(c x)^2 \log \left (1+e^{2 i \text {ArcTan}(c x)}\right )-12 i \text {ArcTan}(c x) \text {PolyLog}\left (2,-e^{2 i \text {ArcTan}(c x)}\right )+6 \text {PolyLog}\left (3,-e^{2 i \text {ArcTan}(c x)}\right )-3 i \sin (2 \text {ArcTan}(c x))+6 \text {ArcTan}(c x) \sin (2 \text {ArcTan}(c x))+6 i \text {ArcTan}(c x)^2 \sin (2 \text {ArcTan}(c x))\right )}{12 c^2 d^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [C] Result contains higher order function than in optimal. Order 9 vs. order
4.
time = 1.41, size = 969, normalized size = 4.49 Too large to display
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int \frac {x\,{\left (a+b\,\mathrm {atan}\left (c\,x\right )\right )}^2}{{\left (d+c\,d\,x\,1{}\mathrm {i}\right )}^2} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________